class ShopBigItem extends eui.ItemRenderer{
    private shopitem_1:shopItem;
    private shopItem_2:shopItem;
    private oldData;
	
	public constructor() {
		super();
		this.init();
	}

	protected init()
	{
		this.cacheAsBitmap = true;
		this.skinName = "ShopBigItemView";
		this.addEventListener(egret.Event.REMOVED_FROM_STAGE, this.destory, this);
	}

	protected childrenCreated():void{
		super.childrenCreated();
	}

	protected dataChanged(){
		if(this.oldData == this.data)
			return;
		this.oldData = this.data;

        this.initUI();
	}

    public initUI()
    {
        let index = 1;
        for(let v of this.data)
        {
            this['shopitem_'+index].initUI(v);
            index++;
        }
    }

	public destory()
	{
		this.removeEventListener(egret.Event.REMOVED_FROM_STAGE, this.destory, this);
		this.oldData = null;
	}
}

window['ShopBigItem'] = ShopBigItem;